<template>
  <div class="cart">
    <nav-bar class="nav-bar">
      <div slot="center">商品收藏 ({{ length }})</div>
    </nav-bar>

    <!-- 商品列表 -->
    <category-list></category-list>

  </div>
</template>

<script>
import NavBar from '@/components/common/navbar/NavBar.vue';
import CategoryList from './childComps/CategoryList.vue'

import { mapGetters } from 'vuex'
export default {
  name: 'category',
  components: {
    NavBar,
    CategoryList
  },
  computed: {
    ...mapGetters({
      // 扩展并重新命名
      length: 'sclistlength'
    })
  }
}
</script>

<style scoped>
.cart {
  height: 100vh;
  /* position: relative; */
}

.nav-bar {
  background-color: var(--color-tint);
  color: #fff;
  /*z-index: 1;*/
}
</style>